package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysCooperationMapper;
import com.ruoyi.system.domain.SysCooperation;
import com.ruoyi.system.service.ISysCooperationService;

/**
 * 企业管理Service业务层处理
 * 
 * @author riddou
 * @date 2022-04-11
 */
@Service
public class SysCooperationServiceImpl implements ISysCooperationService 
{
    @Autowired
    private SysCooperationMapper sysCooperationMapper;

    /**
     * 查询企业管理
     * 
     * @param cooperId 企业管理主键
     * @return 企业管理
     */
    @Override
    public SysCooperation selectSysCooperationByCooperId(Long cooperId)
    {
        return sysCooperationMapper.selectSysCooperationByCooperId(cooperId);
    }

    /**
     * 查询企业管理列表
     * 
     * @param sysCooperation 企业管理
     * @return 企业管理
     */
    @Override
    public List<SysCooperation> selectSysCooperationList(SysCooperation sysCooperation)
    {
        return sysCooperationMapper.selectSysCooperationList(sysCooperation);
    }

    /**
     * 新增企业管理
     * 
     * @param sysCooperation 企业管理
     * @return 结果
     */
    @Override
    public int insertSysCooperation(SysCooperation sysCooperation)
    {
        sysCooperation.setCreateTime(DateUtils.getNowDate());
        return sysCooperationMapper.insertSysCooperation(sysCooperation);
    }

    /**
     * 修改企业管理
     * 
     * @param sysCooperation 企业管理
     * @return 结果
     */
    @Override
    public int updateSysCooperation(SysCooperation sysCooperation)
    {
        sysCooperation.setUpdateTime(DateUtils.getNowDate());
        return sysCooperationMapper.updateSysCooperation(sysCooperation);
    }

    /**
     * 批量删除企业管理
     * 
     * @param cooperIds 需要删除的企业管理主键
     * @return 结果
     */
    @Override
    public int deleteSysCooperationByCooperIds(Long[] cooperIds)
    {
        return sysCooperationMapper.deleteSysCooperationByCooperIds(cooperIds);
    }

    /**
     * 删除企业管理信息
     * 
     * @param cooperId 企业管理主键
     * @return 结果
     */
    @Override
    public int deleteSysCooperationByCooperId(Long cooperId)
    {
        return sysCooperationMapper.deleteSysCooperationByCooperId(cooperId);
    }
}
